package collection;

import java.util.Collection;
import java.util.ArrayList;
public class CollectionDemo3 {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        Point p1 = new Point(1,2);
        c.add(p1);
        System.out.println(p1);
        System.out.println(c);

        p1.setX(100);
        System.out.println(p1);
        System.out.println(c);
    }
}























